home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Business / Random / PC to Mac Conversion / PC2MAC.PRG / PC2MAC.PRG next >
Text File  |  1992-05-29  |  51KB  |  1,587 lines

  1. ******************************************************************************
  2. *** pc2mac.prg
  3. *** demonstrating PC to Mac conversion
  4. *** (c) Nancy Jacobsen, 1990
  5. ******************************************************************************
  6. set procedure to PC2MAC
  7. clear all
  8. set safety off
  9. set escape off
  10. set status off
  11. set delim off
  12. set scoreboard off
  13. set exact on
  14. set talk off
  15. set bell off
  16.  
  17. *** establish public variables
  18. *** mmac is a logical variable that determines whether program is
  19. ***         running on a Macintosh
  20.  
  21. public MMAC,CCLBOX,CCLTITLE,CCLTEXT,CCLMENU,CCLGET,CCLWARN,WWTEXT
  22. MMAC=.f.
  23.  
  24. *** determine if program is running on a Macintosh
  25.  
  26. if sys(17)='68000' .or. sys(17)='68010' .or. sys(17)='68020' .or. ;
  27.       sys(17)='68030'
  28.    store .t. to MMAC
  29. endif
  30.  
  31. *** establish that correct version of Foxbase is being used
  32. if MMAC
  33.    if .not. '2.00'$upper(version()) .and. .not. '2.01'$upper(version())
  34.       clear
  35.       @ 10,17 say 'THIS PROGRAM **MUST** OPERATE UNDER FOXPLUS MAC OR'
  36.       @ 12,17 say '      RUNTIME VERSION 2.00 OR GREATER'
  37.       @ 14,17 say '  RUNTIME 2.00 IS INCLUDED WITH DISPLAY/390'
  38.       @ 16,15 say 'IF YOU HAVE ANY QUESTIONS, CALL DISPLAY/390 SUPPORT'
  39.       @ 23,0
  40.       wait
  41.       quit
  42.    endif
  43. else
  44.    if '2.00'$upper(version()) .or. '1.00'$upper(version())
  45.       clear
  46.       @ 10,17 say 'THIS PROGRAM **MUST** OPERATE UNDER FOXPLUS OR'
  47.       @ 12,17 say '      FOXPRUN VERSION 2.10 OR GREATER'
  48.       @ 14,17 say '  RUNTIME 2.10 IS INCLUDED WITH DISPLAY/390'
  49.       @ 16,15 say 'IF YOU HAVE ANY QUESTIONS, CALL DISPLAY/390 SUPPORT'
  50.       @ 23,0
  51.       wait
  52.       set color to
  53.       quit
  54.    endif
  55. endif
  56.  
  57. *** Macintosh screen commands
  58.  
  59. if MMAC
  60.    screen type 8 at 0,0           && chooses round bordered screen & centers it
  61.    screen FONT "Monaco",9         && chooses a 9 point Monaco font
  62.    screen heading "DISPLAY/390"   && creates a title for the screen
  63.    screen lock                       && disables ability to close screen
  64.                                   && LOCK should always come last
  65.    
  66.    *** these commands may also be combined as in:
  67.    *** SCREEN TYPE 8 AT 0,0 FONT "Monaco",9 HEADING "DISPLAY/390" LOCK
  68. endif
  69.  
  70. *** Macintosh printer commands (if printing to COM port)
  71. *** In my program have a printer settings program that allows users to
  72. *** configure the program for a specific printer. The settings are saved
  73. *** in Printer.Mem.
  74. *** Note that in the SET PRINTER TO command PRNBAUD is not a macro. Don't 
  75. *** know why. 
  76. if MMAC
  77.    if .not. file('PRINTER.MEM')
  78.       PRNPORT='COM2'              && Imagewriter defaults
  79.       PRNBAUD=9600                && adjust these defaults for your printer
  80.       PRNPARITY='N'
  81.       PRNDATA='8'
  82.       PRNSTOP='1'
  83.       PRNHAND='H'
  84.       PRNEND='RL'
  85.       PRNCH10='N'                 && escape sequence for 10 chars/inch
  86.       PRN6LINE='A'                && escape sequence for 6 lines/inch
  87.       PRNCH17='Q'                 && escape sequence for 17 chars/inch
  88.       save all like PRN* to 'PRINTER.MEM'
  89.    else
  90.       restore from 'PRINTER.MEM' additive
  91.    endif
  92.    set printer to &PRNPORT,PRNBAUD,&PRNPARITY,&PRNDATA,&PRNSTOP,&PRNHAND,&PRNEND
  93.    release all like PRN*
  94. endif
  95.  
  96. *** Handling color for PC's and Mac's
  97. *** Note: ISCOLOR() will return True on some monochrome monitors. 
  98. if iscolor()
  99.    if .not. MMAC
  100.       *** pc colors here
  101.       CCLTITLE='BG+/N,N/BG+'
  102.       CCLBOX='GR+/N,N/GR+'
  103.       CCLTEXT='W+/N,N/W+'
  104.       CCLWARN='R+/N,N/R+'
  105.       CCLGET='W/N,N/W'
  106.       CCLMENU='BG+/N,N/W'
  107.    else
  108.       *** mac colors here
  109.       CCLTITLE=''
  110.       CCLBOX=''
  111.       CCLTEXT=''
  112.       CCLWARN=''
  113.       CCLGET=''
  114.       CCLMENU=''
  115.    endif
  116. else
  117.    CCLTITLE=''
  118.    CCLBOX=''
  119.    CCLTEXT=''
  120.    CCLWARN=''
  121.    CCLGET=''
  122.    CCLMENU=''
  123. endif
  124.  
  125. *** Wait string: nice for Mac since all it says by default is "Waiting"
  126. if MMAC
  127.    WWTEXT='Press any key to continue'
  128. else
  129.    WWTEXT=''
  130. endif
  131.  
  132. *** if you have your own help routines (haven't converted over to the Mac way)
  133. *** and want to emulate the way it works in DOS
  134. if MMAC
  135.    set help off                   && <-this disables help in the Apple menu
  136.                                   && otherwise, users will get Fox help
  137.    on key=240 do help             && <-doesn't work for Mac plus (nothing does)
  138.                                   && or for machines that emulate function keys
  139.                                   && by pressing Command #. But I don't know 
  140.                                   && how you know what's available on a 
  141.                                   && particular machine.
  142. else
  143.    on key=315 do help
  144. endif
  145.  
  146. if file('function.mem')
  147.    restore from FUNCTION.MEM additive
  148. else
  149.    store ' ' to X2,X3,X4,X5,X6,X7,X8,X9,X10
  150. endif
  151. set function 2 to X2
  152. set function 3 to X3
  153. set function 4 to X4
  154. set function 5 to X5
  155. set function 6 to X6
  156. set function 7 to X7
  157. set function 8 to X8
  158. set function 9 to X9
  159. set function 10 to X10
  160.  
  161. *** if you use @...PROMPT style menus, Mac users have an additional selection
  162. *** option -- they can point with the mouse and double click on their choice
  163. *** as well as move the bar and press <RETURN> or type the option letter
  164. if MMAC
  165.    store "     DOUBLE CLICK, MOVE BAR OR TYPE LETTER TO SELECT" to MMESSAGE
  166. else
  167.    store "CHOOSE AN OPTION BY MOVING BAR OR ENTERING OPTION LETTER" to MMESSAGE
  168. endif
  169.  
  170. *** I was hoping to find a way to replace the "About FoxBASE+' message
  171. *** that normally shows up in the Apple menu with an "About Your Program
  172. *** message. Unfortunately, can't seem to do it in a program that doesn't
  173. *** use Mac's ON MENU command (and we're trying to avoid that in a basic
  174. *** conversion) without weird things happening.
  175. *** However it is possible to make the "About FoxBASE" message disappear.
  176. if MMAC
  177.    dimension MENUBAR(1)                     && for real fun, store '' to aabout
  178.    MENUBAR(1)=' '                           && this completely disables the
  179.    menu bar MENUBAR                         && Apple menu until you quit Foxbase
  180.    menu off 1
  181.    store '   ' to AABOUT
  182.    menu -2, AABOUT
  183.    on menu
  184. endif
  185. *** if you want to see how it works to try an "About Your Program" change
  186. *** the code above as follows:
  187. *** STORE "ABOUT YOUR PROGRAM" TO AABOUT
  188. *** ON MENU DO ABOUT (procedure included at bottom of this .prg)
  189. *** While at the main menu, choose this option. Nothing happens, but as soon
  190. *** as you select an option (try screen examples), it pops up. There are other
  191. *** weird things -- it doesn't work when you're sitting at any kind of menu
  192. *** and it has odd effects on the other procedures. I'm sure this has to do 
  193. *** with my totally not understanding something.
  194.  
  195. *** fancy intro designed with Mac screen painter
  196. if MMAC
  197.    clear
  198.    screen 5 type 1  at 0,0 size 197,385 pixels  font "Geneva",12 color 0,0,0,-1,-1,-1 top
  199.    @ pixels 45,106 say "Fancy Intro" style 65536 font "New York",24 color 0,0,0,-1,-1,-1
  200.    @ pixels 81,88 say "Just to Show You What's Possible" style 65536 font "Chicago",12 color 0,0,0,-1,-1,-1
  201.    @ pixels 117,109 say "(c) 1990 Nancy Jacobsen" style 65536 font "Geneva",12 color 0,0,0,-1,-1,-1
  202.    @ pixels 133,85 say "Just Fooling Around, Enterprises" style 65536 font "Geneva",12 color 0,0,0,-1,-1,-1
  203.    wait WWTEXT
  204.    screen 5 off
  205.    screen 5 delete
  206.    screen 1 top lock
  207. endif
  208.  
  209. *** main program loop
  210. do while .t.
  211.    clear
  212.    close databases
  213.    set color to &CCLBOX
  214.    @ 4,10 to 4,69 double
  215.    @ 12,10 to 12,69 double
  216.    @ 1,9 to 14,69 double
  217.    @ 4, 9 say iif(MMAC,'',chr(204))
  218.    @ 4, 69 say iif(MMAC,'',chr(185))
  219.    @ 12, 9 say iif(MMAC,'',chr(204))
  220.    @ 12, 69 say iif(MMAC,'',chr(185))
  221.    set color to &CCLTITLE
  222.    @ 2, 35 say "PC TO MAC"
  223.    @ 3, 35 say "MAIN MENU"
  224.    @ 13, 11 say MMESSAGE
  225.    set color to &CCLTEXT
  226.    @ 6, 28 prompt "A. SCREEN EXAMPLES     "
  227.    @ 7, 28 prompt "B. MENU EXAMPLES       "
  228.    @ 8, 28 prompt "C. PRINTING EXAMPLES   "
  229.    @ 9, 28 prompt "Q. QUIT                "
  230.    @ 10, 28 prompt "?. HELP                "
  231.    clear typeahead
  232.    menu to CHOICE
  233.    do case
  234.    case CHOICE= 1
  235.       do BOXPROG
  236.    case CHOICE= 2
  237.       do MENUPROG
  238.    case CHOICE= 3
  239.       do PRINPROG
  240.    case CHOICE= 4
  241.       if MMAC
  242.          clear
  243.          ALERT CAUTION 3 to WWHAT "Wow! Is this Mac or what? Do you really want to quit?"
  244.          if WWHAT=1
  245.             cancel
  246.          endif
  247.       else
  248.          WWHAT='Y'
  249.          set color to &CCLWARN
  250.          @ 13,11 clear to 13,68
  251.          @ 13,20 say "DO YOU REALLY WANT TO QUIT? (Y/N) "
  252.          set color to &CCLGET
  253.          @ row(),col() get WWHAT picture '!' valid WWHAT$'YN'
  254.          read
  255.          if WWHAT='Y'
  256.             clear
  257.             cancel
  258.          endif
  259.       endif
  260.    case CHOICE= 5
  261.       do help
  262.    endcase
  263. enddo .T.
  264.  
  265.  
  266. **************************************************************************
  267. *** BOXPROG.PRG
  268. *** demonstrates the differences between PC screen painting techniques
  269. *** and Mac screen techniques
  270. **************************************************************************
  271. procedure BOXPROG
  272.  
  273. *** the following code is original DOS code
  274. set color to &CCLBOX
  275. clear
  276. @ 10,5 say 'THE FOLLOWING THREE SCREENS ARE IN UNCHANGED DOS CODE'
  277. wait
  278.  
  279. clear
  280. set color to &CCLBOX
  281. @  3, 0 to 12,79 double
  282. @ 12, 0 to 14,79 double
  283. @ 13,40 to 14,40 double
  284. @ 12, 0 say "Ã"
  285. @ 12,79 say "π"
  286. @ 12,40 say "À"
  287. @ 14,40 say " "
  288. set color to &CCLTEXT
  289. @  5, 4 say "This is an example of a screen created in Foxview, using the DOUBLE"
  290. @  6, 4 say "command for box generation and a variety of extended characters."
  291. @  8, 4 say " This character for example."
  292. @  9, 4 say " And this one."
  293. @ 11, 4 say "Plus connecting characters like Ã, π,  , and À."
  294. @ 23, 0
  295. wait WWTEXT
  296.  
  297. clear
  298. set color to &CCLBOX
  299. @  3, 0,12,79 box "…Õª∫ºÕ»∫"
  300. @ 12, 0,14,79 box "…Õª∫ºÕ»∫"
  301. @ 13,40,14,40 box "…Õª∫ºÕ»∫"
  302. @ 12, 0 say "Ã"
  303. @ 12,79 say "π"
  304. @ 12,40 say "À"
  305. @ 14,40 say " "
  306. set color to &CCLTEXT
  307. @  5, 4 say "This is an example of a screen created in Foxview, using the BOX"
  308. @  6, 4 say "command for box generation and a variety of extended characters."
  309. @  8, 4 say " This character for example."
  310. @  9, 4 say " And this one."
  311. @ 11, 4 say "Plus connecting characters like Ã, π,  , and À."
  312. @ 23, 0
  313. wait WWTEXT
  314.  
  315. clear
  316. set color to &CCLBOX
  317. @  2, 8 say "…ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª"
  318. @  3, 8 say "∫                                                          ∫"
  319. @  4, 8 say "∫                                                          ∫"
  320. @  5, 8 say "∫   This box was created by appending a text file into     ∫"
  321. @  6, 8 say "∫   Foxview without further manipulation of boxes.         ∫"
  322. @  7, 8 say "∫                                                          ∫"
  323. @  8, 8 say "∫                                                          ∫"
  324. @  9, 8 say "ÃÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕπ"
  325. @ 10, 8 say "∫  CHOOSE OPTION BY MOVING BAR OR ENTERING OPTION LETTER   ∫"
  326. @ 11, 8 say "»ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº"
  327. @ 23, 0
  328. wait WWTEXT
  329.  
  330. *** the following code has been changed to accommodate the Mac and to run
  331. *** properly on either machine
  332. clear
  333. set color to &CCLBOX
  334. @ 10,5 say 'THE FOLLOWING THREE SCREENS ARE IN DOS CODE MODIFIED FOR THE MAC'
  335. wait WWTEXT
  336.  
  337. clear
  338. set color to &CCLBOX
  339. @  3, 0 to 12,79 double
  340. @ 12, 0 to 14,79 double
  341. if MMAC
  342.    @ 12,40,14,40 box
  343. else
  344.    @ 13,40 to 14,40 double
  345. endif
  346. @ 12, 0 say iif(MMAC,'',chr(204))
  347. @ 12,79 say iif(MMAC,'',chr(185))
  348. @ 12,40 say iif(MMAC,'',chr(203))
  349. @ 14,40 say iif(MMAC,'',chr(202))
  350. set color to &CCLTEXT
  351. @  5, 4 say "This is an example of a screen created in Foxview, using the DOUBLE"
  352. @  6, 4 say "command for double box generation and a variety of extended characters."
  353. @  8, 4 say iif(MMAC,chr(198),chr(16))+" This character for example."
  354. @  9, 4 say iif(MMAC,chr(165),chr(17))+" And this one."
  355. if .not. MMAC
  356.    @ 11, 4 say "Plus connecting characters like Ã, π,  , and À."
  357. endif
  358. @ 23, 0
  359. wait WWTEXT
  360.  
  361. clear
  362. set color to &CCLBOX
  363. @  3, 0,12,79 box "…Õª∫ºÕ»∫"
  364. @ 12, 0,14,79 box "…Õª∫ºÕ»∫"
  365. @ 12,40,14,40 box "…Õª∫ºÕ»∫"
  366. @ 12, 0 say iif(MMAC,'',chr(204))
  367. @ 12,79 say iif(MMAC,'',chr(185))
  368. @ 12,40 say iif(MMAC,'',chr(203))
  369. @ 14,40 say iif(MMAC,'',chr(202))
  370. set color to &CCLTEXT
  371. @  5, 4 say "This is an example of a screen created in Foxview, using the BOX"
  372. @  6, 4 say "command for double box generation and a variety of extended characters."
  373. @  8, 4 say iif(MMAC,chr(198),chr(16))+" This character for example."
  374. @  9, 4 say iif(MMAC,chr(165),chr(17))+" And this one."
  375. if .not. MMAC
  376.    @ 11, 4 say "Plus connecting characters like Ã, π,  , and À."
  377. endif
  378. @ 23, 0
  379. wait WWTEXT
  380.  
  381. clear
  382. set color to &CCLBOX
  383. @  2, 8 to 11,67 double
  384. @  9, 8 to 11,67 double
  385. @  9, 8 say iif(MMAC,'',chr(204))
  386. @  9,67 say iif(MMAC,'',chr(185))
  387. set color to &CCLTEXT
  388. @  5, 9 say "   This box was created by appending a text file into     "
  389. @  6, 9 say "   Foxview without further manipulation of boxes.         "
  390. @ 10, 9 say "  CHOOSE OPTION BY MOVING BAR OR ENTERING OPTION LETTER  "
  391. @ 23, 0
  392. wait WWTEXT
  393. return
  394.  
  395. ******************************************************************************
  396. *** MENUPROG.PRG
  397. *** controls display of menu examples
  398. ******************************************************************************
  399. procedure MENUPROG
  400. private CCHOICES,MCHOICE
  401.  
  402. clear
  403. set color to &CCLBOX
  404. @ 7,5 say '@...MENU / READ MENU TO'
  405. @ 8,5 say '======================='
  406. set color to &CCLTEXT
  407. @ 10,5 say 'THE FIRST MENU EXAMPLE YOU WILL SEE IS A "@...MENU / READ MENU TO"'
  408. @ 11,5 say 'TYPE MENU. WHEN YOU RUN IT ON A PC, YOU WILL GET DIFFERENT RESULTS THAN'
  409. @ 12,5 say 'WHEN YOU RUN IT ON A MAC.'
  410. @ 23,0
  411. wait
  412.  
  413. clear
  414. set color to &CCLMENU
  415. dimension CCHOICES(3,1)
  416. CCHOICES(1)='1ST CHOICE'
  417. CCHOICES(2)='2ND CHOICE'
  418. CCHOICES(3)='3RD CHOICE'
  419. MCHOICE=1
  420. @ 10,5 menu CCHOICES,3 title "SAMPLE MENU"
  421. read menu to MCHOICE
  422. do case
  423. case MCHOICE=1
  424.    @ 16,5 say "You have chosen choice number 1"
  425. case MCHOICE=2
  426.    @ 16,5 say "You have chosen choice number 2"
  427. case MCHOICE=3
  428.    @ 16,5 say "You have chosen choice number 3"
  429. endcase
  430. @ 23,0
  431. wait
  432.  
  433. clear
  434. set color to &CCLBOX
  435. @ 7,5 say "READ MENU BAR TO"
  436. @ 8,5 say '================'
  437. set color to &CCLTEXT
  438. @ 10,5 say 'THE FOLLOWING SAMPLE MENUS WERE TAKEN FROM AN ACTUAL PROGRAM'
  439. @ 11,5 say 'AND THEY REPRESENT SOME EXAMPLES OF THE DIFFICULTIES FACED WHEN'
  440. @ 12,5 say 'PORTING THE "READ BAR MENU TO" TYPE OF MENU TO A MAC'
  441. @ 23,0
  442. wait
  443.  
  444. clear
  445. set color to &CCLBOX
  446. @ 7,5 say "READ MENU BAR TO"
  447. @ 8,5 say '================'
  448. set color to &CCLTEXT
  449. @ 10,5 say 'IF YOU ARE RUNNING THIS PROGRAM ON A PC, THE NEXT MENU YOU WILL SEE'
  450. @ 11,5 say 'IS A STRAIGHT PC "READ MENU BAR TO" MENU'
  451. @ 13,5 say "IF YOU ARE RUNNING THIS PROGRAM ON A MAC, THE NEXT MENU YOU WILL SEE"
  452. @ 14,5 say "IS A DIRECT PORT OF THE PC MENU"
  453. @ 23,0
  454. wait
  455.  
  456. if .not. MMAC
  457.    do D390MASM
  458.    set color to &CCLTEXT
  459.    clear
  460.    @ 10,5 say 'NO FURTHER MENUS IN THIS DEMO RUN ON THE PC'
  461.    @ 23,0
  462.    wait
  463.    return
  464. endif
  465.  
  466. clear
  467. set color to &CCLBOX
  468. @ 7,5 say "READ MENU BAR TO"
  469. @ 8,5 say '================'
  470. set color to &CCLTEXT
  471. @ 10,5 say 'THE FOLLOWING MENU ONLY RUNS ON A MAC'
  472. @ 12,5 say "WITH A FEW EXCEPTIONS, IT'S A DIRECT PORT OF THE PC CODE"
  473. @ 14,5 say 'THE MAJOR PROBLEM WITH THIS MENU IS THAT ALL THE PC OPTIONS ON THE TOP BAR'
  474. @ 15,5 say 'DO NOT FIT ON A SMALL MAC SCREEN. IN THIS CASE IT MEANS THAT QUIT IS NO'
  475. @ 16,5 say 'NO LONGER ACCESSIBLE. SO FOR PURPOSES OF THIS DEMO, PRESS COMMAND Q'
  476. @ 17,5 say 'OR CHOOSE ITEM 1 FROM THE "ACCT" MENU TO QUIT.'
  477. @ 19,5 say "OTHER PROBLEMS ARE THAT MENU CHOICES DON'T LOOK GOOD IN UPPER CASE,"
  478. @ 20,5 say "AND THE MENU STILL APPEARS AFTER A CHOICE HAS BEEN MADE. TRY CHOICES "
  479. @ 21,5 say '"ADD AN ACCOUNT" AND "CHANGE AN ACCOUNT" TO SEE WHAT HAPPENS '
  480. @ 22,5 say 'WHEN A CHOICE IS MADE'
  481. @ 23,0
  482. wait
  483.  
  484. if MMAC
  485.    do D390MAS2
  486. endif
  487.  
  488. clear
  489. set color to &CCLBOX
  490. @ 7,5 say "READ MENU BAR TO"
  491. @ 8,5 say '================'
  492. set color to &CCLTEXT
  493. @ 10,5 say 'THE FOLLOWING MENU ONLY RUNS ON A MAC'
  494. @ 12,5 say 'THIS IS THE SAME MENU CHANGED AND GUSSIED UP FOR THE MAC'
  495. @ 14,5 say 'NOTICE THAT MORE OPTIONS ARE AVAILABLE, THE MENU IS DISABLED AFTER '
  496. @ 15,5 say 'A CHOICE. '
  497. @ 17,5 say 'TRY CHOICES "ADD AN ACCOUNT" AND "CHANGE AN ACCOUNT" TO SEE WHAT'
  498. @ 18,5 say 'HAPPENS WHEN A CHOICE IS MADE'
  499. @ 20,5 say 'PRESS COMMAND Q OR SELECT FROM QT MENU TO QUIT'
  500. @ 23,0
  501. wait
  502.  
  503. if MMAC
  504.    do D390MAS3
  505. endif
  506.  
  507. return
  508.  
  509.  
  510. ******************************************************************************
  511. *** D390MASM.PRG
  512. *** sample "read menu to " -- runs only on PC
  513. ******************************************************************************
  514. procedure D390MASM
  515.  
  516. dimension AZXTOP(11,2)
  517. AZXTOP(1,1)='ACCT '
  518. AZXTOP(2,1)='CONT '
  519. AZXTOP(3,1)=' ADS '
  520. AZXTOP(4,1)='CASH '
  521. AZXTOP(5,1)='CLOS '
  522. AZXTOP(6,1)='ACTG '
  523. AZXTOP(7,1)='CODE '
  524. AZXTOP(8,1)='SYSP '
  525. AZXTOP(9,1)='UTIL '
  526. AZXTOP(11,1)='QUIT '
  527. AZXTOP(10,1)='HELP '
  528. AZXTOP(1,2)='ACCOUNT MAINTENANCE'
  529. AZXTOP(2,2)='CONTRACT MAINTENANCE'
  530. AZXTOP(3,2)='AD MAINTENANCE AND SCHEDULING'
  531. AZXTOP(4,2)='CASH RECEIPTS AND OTHER TRANSACTIONS'
  532. AZXTOP(5,2)='CLOSE ISSUE / ACCOUNTING PERIODS'
  533. AZXTOP(6,2)='ACCOUNTING REPORTS AND PROCEDURES'
  534. AZXTOP(7,2)='CODE FILE MAINTENANCE'
  535. AZXTOP(8,2)='SYSTEM PARAMETERS'
  536. AZXTOP(9,2)='UTILITIES'
  537. AZXTOP(11,2)='QUIT TO MAIN MENU'
  538. AZXTOP(10,2)='HELP'
  539.  
  540. dimension ACCT(12)
  541. ACCT(1)='A. MENU'
  542. ACCT(2)='B. ADD AN ACCOUNT'
  543. ACCT(3)='C. CHANGE AN ACCOUNT'
  544. ACCT(4)='D. DELETE AN ACCOUNT'
  545. ACCT(5)='E. LIST ACCOUNTS'
  546. ACCT(6)='F. MASTER LIST'
  547. ACCT(7)='G. DATA SHEETS-ONE'
  548. ACCT(8)='H. DATA SHEETS-MULTIPLE'
  549. ACCT(9)='I. LABELS-VARIOUS'
  550. ACCT(10)='J. LABELS-BY ISSUE'
  551. ACCT(11)='K. LAST ACTIVITY AGING'
  552. ACCT(12)='L. TICKLER FILE'
  553.  
  554. dimension CTRC(9)
  555. CTRC(1)='A. MENU'
  556. CTRC(2)='B. ADD A CONTRACT'
  557. CTRC(3)='C. CHANGE A CONTRACT'
  558. CTRC(4)='D. DELETE A CONTRACT'
  559. CTRC(5)='E. PRINT LONG FORM REPORTS'
  560. CTRC(6)='F. DISPLAY/PRINT SHORT FORM REPORTS 1'
  561. CTRC(7)='G. DISPLAY/PRINT SHORT FORM REPORTS 2'
  562. CTRC(8)='H. DISPLAY/PRINT ADS SCHEDULED REPORT'
  563. CTRC(9)='I. CONTRACT HISTORY REPORTS/PURGE'
  564.  
  565. dimension AD(13)
  566. AD(1)='A. MENU'
  567. AD(2)='B. ADD AD - COLUMN/INCH'
  568. AD(3)='C. CHANGE AD - COLUMN/INCH'
  569. AD(4)='D. ADD TRANSACTION - COL/INCH'
  570. AD(5)='E. ADD AD - RATE CHART'
  571. AD(6)='F. CHANGE AD - RATE CHART'
  572. AD(7)='G. ADD TRANSACTION - RATE CHART'
  573. AD(8)='H. DELETE AN AD/TRANSACTION'
  574. AD(9)='I. SCHEDULE ADS'
  575. AD(10)='J. RUNSHEET'
  576. AD(11)='K. ADS IN SYSTEM REPORT'
  577. AD(12)='L. ADS FOR AN ACCOUNT REPORT'
  578. AD(13)='M. RATE CHART MAINTENANCE'
  579.  
  580. dimension CASH(7)
  581. CASH(1)='A. MENU'
  582. CASH(2)='B. ADD A TRANSACTION'
  583. CASH(3)='C. CHANGE A TRANSACTION'
  584. CASH(4)='D. DELETE A TRANSACTION'
  585. CASH(5)='E. LIST TRANSACTIONS'
  586. CASH(6)='F. POST TRANSACTIONS'
  587. CASH(7)='G. REPRINT POSTING REPORTS'
  588.  
  589. dimension CLOX(1)
  590. CLOX(1)='A. MENU'
  591.  
  592. dimension ATG(10)
  593. ATG(1)='A. MENU'
  594. ATG(2)='B. AGING REPORTS'
  595. ATG(3)='C. AGE ACCOUNTS RECEIVABLE'
  596. ATG(4)='D. SERVICE CHARGE ASSESSMENT'
  597. ATG(5)='E. STATEMENTS AND INVOICES'
  598. ATG(6)='F. REMINDER NOTICES'
  599. ATG(7)='G. LEDGERS - PRINT/PURGE'
  600. ATG(8)='H. GL DISTRIBUTION - PRINT PURGE'
  601. ATG(9)='I. SALES ANALYSIS REPORTS'
  602. ATG(10)='J. SALES ANALYSIS REPORTS - CONSOLIDATED'
  603.  
  604. dimension CF(6)
  605. CF(1)='A. MENU'
  606. CF(2)='B. GL NUMBERS'
  607. CF(3)='C. TRANSACTION CODES'
  608. CF(4)='D. SALESPERSON CODES'
  609. CF(5)='E. SECTION CODES'
  610. CF(6)='F. ACCOUNT TYPE CODES'
  611.  
  612. dimension SY(1)
  613. SY(1)='A. MENU'
  614.  
  615. dimension UT(11)
  616. UT(1)='A. MENU'
  617. UT(2)='B. BALANCE FORWARD'
  618. UT(3)='C. REINDEX'
  619. UT(4)='D. BALANCE CHECK'
  620. UT(5)='E. CHANGE SALESPERSON CODES'
  621. UT(6)='F. DIAGNOSTIC REPORT'
  622. UT(7)='G. CHANGE SYSTEM DATE'
  623. UT(8)='H. RUN DOS COMMANDS'
  624. UT(9)='I. FUNCTION KEYS ASSIGNMENT'
  625. UT(10)='J. CHANGE ACCOUNT CODES'
  626. UT(11)='K. USER CHECK'
  627.  
  628. dimension HLP(9)
  629. HLP(1)='A. ACCOUNTS'
  630. HLP(2)='B. CONTRACTS'
  631. HLP(3)='C. ADS/SCHEDULING'
  632. HLP(4)='D. CASH/TRANSACTIONS'
  633. HLP(5)='E. CLOSE ISSUE/PERIODS'
  634. HLP(6)='F. ACCOUNTING'
  635. HLP(7)='G. FILE MAINTENANCE'
  636. HLP(8)='H. SYSTEM PARAMETERS'
  637. HLP(9)='I. UTILITIES'
  638.  
  639. dimension QT(1)
  640. QT(1)='Q. QUIT TO MAIN MENU'
  641. AXZROW=1
  642. AXZCOL=1
  643. do while .t.
  644.    set color to &CCLMENU
  645.    clear
  646.    close databases
  647.    menu bar AZXTOP,11
  648.    menu 1,ACCT,12,12
  649.    menu 2,CTRC,9,9
  650.    menu 3,AD,13,13
  651.    menu 4,CASH,7,7
  652.    menu 5,CLOX,1,1
  653.    menu 6,ATG,10,10
  654.    menu 7,CF,6,6
  655.    menu 8,SY,1,1
  656.    menu 9,UT,11,11
  657.    menu 10,HLP,9,9
  658.    menu 11,QT,1,1
  659.    read menu bar to AXZCOL, AXZROW save
  660.    do case
  661.    case AXZCOL=11 .and. AXZROW=1
  662.       close data
  663.       return
  664.    endcase
  665. enddo
  666.  
  667. ******************************************************************************
  668. *** D390MAS2.PRG
  669. *** port of d390masm to a mac
  670. ******************************************************************************
  671. procedure D390MAS2
  672.  
  673. dimension AZXTOP(11,2)
  674. AZXTOP(1,1)='ACCT '
  675. AZXTOP(2,1)='CONT '
  676. AZXTOP(3,1)=' ADS '
  677. AZXTOP(4,1)='CASH '
  678. AZXTOP(5,1)='CLOS '
  679. AZXTOP(6,1)='ACTG '
  680. AZXTOP(7,1)='CODE '
  681. AZXTOP(8,1)='SYSP '
  682. AZXTOP(9,1)='UTIL '
  683. AZXTOP(11,1)='QUIT '
  684. AZXTOP(10,1)='HELP '
  685.  
  686. *** the following items won't show up
  687. AZXTOP(1,2)='ACCOUNT MAINTENANCE'
  688. AZXTOP(2,2)='CONTRACT MAINTENANCE'
  689. AZXTOP(3,2)='AD MAINTENANCE AND SCHEDULING'
  690. AZXTOP(4,2)='CASH RECEIPTS AND OTHER TRANSACTIONS'
  691. AZXTOP(5,2)='CLOSE ISSUE / ACCOUNTING PERIODS'
  692. AZXTOP(6,2)='ACCOUNTING REPORTS AND PROCEDURES'
  693. AZXTOP(7,2)='CODE FILE MAINTENANCE'
  694. AZXTOP(8,2)='SYSTEM PARAMETERS'
  695. AZXTOP(9,2)='UTILITIES'
  696. AZXTOP(11,2)='QUIT TO MAIN MENU'
  697. AZXTOP(10,2)='HELP'
  698.  
  699. dimension ACCT(12)
  700. ACCT(1)='Q. MENU/Q'
  701. ACCT(2)='B. ADD AN ACCOUNT'
  702. ACCT(3)='C. CHANGE AN ACCOUNT'
  703. ACCT(4)='D. DELETE AN ACCOUNT'
  704. ACCT(5)='E. LIST ACCOUNTS'
  705. ACCT(6)='F. MASTER LIST'
  706. ACCT(7)='G. DATA SHEETS-ONE'
  707. ACCT(8)='H. DATA SHEETS-MULTIPLE'
  708. ACCT(9)='I. LABELS-VARIOUS'
  709. ACCT(10)='J. LABELS-BY ISSUE'
  710. ACCT(11)='K. LAST ACTIVITY AGING'
  711. ACCT(12)='L. TICKLER FILE'
  712.  
  713. dimension CTRC(9)
  714. CTRC(1)='A. MENU'
  715. CTRC(2)='B. ADD A CONTRACT'
  716. CTRC(3)='C. CHANGE A CONTRACT'
  717. CTRC(4)='D. DELETE A CONTRACT'
  718. CTRC(5)='E. PRINT LONG FORM REPORTS'
  719. CTRC(6)='F. DISPLAY/PRINT SHORT FORM REPORTS 1'
  720. CTRC(7)='G. DISPLAY/PRINT SHORT FORM REPORTS 2'
  721. CTRC(8)='H. DISPLAY/PRINT ADS SCHEDULED REPORT'
  722. CTRC(9)='I. CONTRACT HISTORY REPORTS/PURGE'
  723.  
  724. dimension AD(13)
  725. AD(1)='A. MENU'
  726. AD(2)='B. ADD AD - COLUMN/INCH'
  727. AD(3)='C. CHANGE AD - COLUMN/INCH'
  728. AD(4)='D. ADD TRANSACTION - COL/INCH'
  729. AD(5)='E. ADD AD - RATE CHART'
  730. AD(6)='F. CHANGE AD - RATE CHART'
  731. AD(7)='G. ADD TRANSACTION - RATE CHART'
  732. AD(8)='H. DELETE AN AD/TRANSACTION'
  733. AD(9)='I. SCHEDULE ADS'
  734. AD(10)='J. RUNSHEET'
  735. AD(11)='K. ADS IN SYSTEM REPORT'
  736. AD(12)='L. ADS FOR AN ACCOUNT REPORT'
  737. AD(13)='M. RATE CHART MAINTENANCE'
  738.  
  739. dimension CASH(7)
  740. CASH(1)='A. MENU'
  741. CASH(2)='B. ADD A TRANSACTION'
  742. CASH(3)='C. CHANGE A TRANSACTION'
  743. CASH(4)='D. DELETE A TRANSACTION'
  744. CASH(5)='E. LIST TRANSACTIONS'
  745. CASH(6)='F. POST TRANSACTIONS'
  746. CASH(7)='G. REPRINT POSTING REPORTS'
  747.  
  748. dimension CLOX(1)
  749. CLOX(1)='A. MENU'
  750.  
  751. dimension ATG(10)
  752. ATG(1)='A. MENU'
  753. ATG(2)='B. AGING REPORTS'
  754. ATG(3)='C. AGE ACCOUNTS RECEIVABLE'
  755. ATG(4)='D. SERVICE CHARGE ASSESSMENT'
  756. ATG(5)='E. STATEMENTS AND INVOICES'
  757. ATG(6)='F. REMINDER NOTICES'
  758. ATG(7)='G. LEDGERS - PRINT/PURGE'
  759. ATG(8)='H. GL DISTRIBUTION - PRINT PURGE'
  760. ATG(9)='I. SALES ANALYSIS REPORTS'
  761. ATG(10)='J. SALES ANALYSIS REPORTS - CONSOLIDATED'
  762.  
  763. dimension CF(6)
  764. CF(1)='A. MENU'
  765. CF(2)='B. GL NUMBERS'
  766. CF(3)='C. TRANSACTION CODES'
  767. CF(4)='D. SALESPERSON CODES'
  768. CF(5)='E. SECTION CODES'
  769. CF(6)='F. ACCOUNT TYPE CODES'
  770.  
  771. dimension SY(1)
  772. SY(1)='A. MENU'
  773.  
  774. dimension UT(11)
  775. UT(1)='A. MENU'
  776. UT(2)='B. BALANCE FORWARD'
  777. UT(3)='C. REINDEX'
  778. UT(4)='D. BALANCE CHECK'
  779. UT(5)='E. CHANGE SALESPERSON CODES'
  780. UT(6)='F. DIAGNOSTIC REPORT'
  781. UT(7)='G. CHANGE SYSTEM DATE'
  782. UT(8)='H. RUN DOS COMMANDS'
  783. UT(9)='I. FUNCTION KEYS ASSIGNMENT'
  784. UT(10)='J. CHANGE ACCOUNT CODES'
  785. UT(11)='K. USER CHECK'
  786.  
  787. dimension HLP(9)                         && this choice does not show up
  788. HLP(1)='A. ACCOUNTS'
  789. HLP(2)='B. CONTRACTS'
  790. HLP(3)='C. ADS/SCHEDULING'
  791. HLP(4)='D. CASH/TRANSACTIONS'
  792. HLP(5)='E. CLOSE ISSUE/PERIODS'
  793. HLP(6)='F. ACCOUNTING'
  794. HLP(7)='G. FILE MAINTENANCE'
  795. HLP(8)='H. SYSTEM PARAMETERS'
  796. HLP(9)='I. UTILITIES'
  797.  
  798. dimension QT(1)                         && this choice does not show up
  799. QT(1)='Q. QUIT TO MAIN MENU'
  800. AXZROW=1
  801. AXZCOL=1
  802. do while .t.
  803.    set color to &CCLMENU
  804.    clear
  805.    @ 15,28 say "Press Command Q to Quit"
  806.    close databases
  807.    menu bar AZXTOP,11
  808.    menu 1,ACCT,12,12
  809.    menu 2,CTRC,9,9
  810.    menu 3,AD,13,13
  811.    menu 4,CASH,7,7
  812.    menu 5,CLOX,1,1
  813.    menu 6,ATG,10,10
  814.    menu 7,CF,6,6
  815.    menu 8,SY,1,1
  816.    menu 9,UT,11,11
  817.    menu 10,HLP,9,9
  818.    menu 11,QT,1,1
  819.    read menu bar to AXZCOL, AXZROW save
  820.    do case
  821.    case AXZCOL=1  .and. AXZROW=1
  822.       close data
  823.       return
  824.    case AXZCOL=11 .and. AXZROW=1   && doesn't work -- not available on menu
  825.       close data
  826.       return
  827.    case AXZCOL=1  .and. AXZROW=2
  828.       do BOXPROG
  829.    case AXZCOL=1  .and. AXZROW=3
  830.       do help
  831.    endcase
  832. enddo
  833.  
  834. ******************************************************************************
  835. *** D390MAS3.PRG
  836. *** port of d390masm to a mac -- GUSSIED UP
  837. ******************************************************************************
  838. procedure D390MAS3
  839.  
  840. *** Since the Mac menu bar always includes the Apple menu, the File menu and
  841. *** the Edit menu, you may not be able to include as many options as you can
  842. *** with DOS READ MENU BAR TO as has happened here.
  843.  
  844. *** When translated to the Mac, upper case letters no longer look good in
  845. *** the font that FoxBASE+/Mac uses for this kind of menu. Indeed they take
  846. *** up a lot of space. You can actually get another menu bar option or two
  847. *** simply by changing menu options to capitalized/lower case.
  848.  
  849. *** The Mac menus allow all sorts of fancy formatting, separating lines, and
  850. *** the installation of keyboard shortcut keys. This program has examples
  851. *** of all these. See the ON MENU command for how to do this.
  852.  
  853. *** The menu is no longer "sticky" -- it won't stay down, but must be pulled
  854. *** down. A return to the menu does not take it back to where it was -- the
  855. *** choice must be made by clicking and pulling all over again.
  856. *** While on the PC, you could select an option from the drop down menu by
  857. *** pressing the first letter of an option -- that doesn't work any more. You
  858. *** have to make do with "keyboard shortcuts." Unfortunately, there aren't as
  859. *** many available keys because each keyboard shortcut letter can only have
  860. *** one purpose on the entire menu -- not depending on which menu you're in.
  861. *** Since the "/" now denotes a hot key or keyboard shortcut, these characters
  862. *** must be removed from any existing choices.
  863.  
  864. *** After a choice is made, the menu at the top is grayed out. A user can still
  865. *** see what the options are -- they'll just be gray.
  866.  
  867. *** One nice thing about this menu on the Mac is that you can put in comments
  868. *** on the screen -- an example is included here.
  869.  
  870. *** DIFFERENCES BETWEEN THIS AND "ON MENU"
  871. *** ON MENU is very similar but it's intent is to allow event drive programming
  872. *** while this menu type does not.
  873. *** In ON MENU, options can be defined as either arrays or character strings."
  874. *** For example, the "acct" array variable defined in this code could be
  875. *** programmed as:
  876. *** STORE "<BMenu/A;Add an Account;Change an Account;Delete an Account;List Accounts;Master List" TO ACCT
  877. *** STORE ACCT+";Data Sheets - One;Data Sheets - Multiple;Labels - Various;Labels - By Issue;" TO ACCT
  878. *** STORE ACCT+"Last Activity Aging;Tickler File" TO ACCT
  879. *** Character strings or arrays can both be used in the same code.
  880. *** The trouble with character strings is that if there are a lot of
  881. *** options and/or options with long names, the end may get truncated --
  882. *** no error message, just not there.
  883.  
  884. dimension AZXTOP(11,2)
  885. AZXTOP(1,1)='Acct'       && Mix of upper and lower case allows more options
  886. AZXTOP(2,1)='Cont'       && per menu bar -- still not as many as DOS
  887. AZXTOP(3,1)='Ads'
  888. AZXTOP(4,1)='Cash'
  889. AZXTOP(5,1)='Clos'
  890. AZXTOP(6,1)='Actg'
  891. AZXTOP(7,1)='Code'
  892. AZXTOP(8,1)='Sys'
  893. AZXTOP(9,1)='Util'
  894. AZXTOP(10,1)='Qt'        && by reducing to 2 characters, can now get on menu
  895. *azxtop(11,1)='Help'     && no room for this -- eliminate for now
  896.  
  897. *** The messages that normally display on the screen on the PC with this type
  898. *** menu do not display on the Mac. The following code could be eliminated.
  899. AZXTOP(1,2)='Account Maintenance'
  900. AZXTOP(2,2)='Contract Maintenance'
  901. AZXTOP(3,2)='Ad Maintenance and Scheduling'
  902. AZXTOP(4,2)='Cash Receipts and Other Transactions'
  903. AZXTOP(5,2)='Close Issue : Accounting Periods'
  904. AZXTOP(6,2)='Accounting Reports and Procedures'
  905. AZXTOP(7,2)='Code File Maintenance'
  906. AZXTOP(8,2)='System Parameters'
  907. AZXTOP(9,2)='Utilities'
  908. AZXTOP(11,2)='Quit to Main Menu'
  909. AZXTOP(10,2)='Help'
  910.  
  911. dimension ACCT(13)
  912. ACCT(1)='<BMenu/A'              && note that "<B" will bold face choice
  913. ACCT(2)='Add an account'        && "/A" creates a keyboard shortcut
  914. ACCT(3)='Change an account'     && note that initial letters have been
  915. ACCT(4)='Delete an account'     && removed since they didn't work anyway
  916. ACCT(5)='(-'                    && <-add a line, counts as a variable
  917. ACCT(6)='List accounts'
  918. ACCT(7)='Master list'
  919. ACCT(8)='Data sheets-one'
  920. ACCT(9)='Data sheets-multiple'
  921. ACCT(10)='Labels-various'
  922. ACCT(11)='Labels-by issue'
  923. ACCT(12)='Last activity aging'
  924. ACCT(13)='Tickler file'
  925.  
  926. dimension CTRC(9)
  927. CTRC(1)='<BMenu/C'
  928. CTRC(2)='Add a contract'
  929. CTRC(3)='Change a contract'
  930. CTRC(4)='Delete a contract'
  931. CTRC(5)='Print long form reports'
  932. CTRC(6)='Display:print short form reports 1' && "/" replaced by colon
  933. CTRC(7)='Display:print short form reports 2'
  934. CTRC(8)='Display:print ads scheduled report'
  935. CTRC(9)='Contract history reports:purge'
  936.  
  937. dimension AD(13)
  938. AD(1)='<BMenu/D'
  939. AD(2)='Add ad - column:inch'
  940. AD(3)='Change ad - column:inch'
  941. AD(4)='Add transaction - col:inch'
  942. AD(5)='Add ad - rate chart'
  943. AD(6)='Change ad - rate chart'
  944. AD(7)='Add transaction - rate chart'
  945. AD(8)='Delete an ad:transaction'
  946. AD(9)='Schedule ads'
  947. AD(10)='Runsheet'
  948. AD(11)='Ads in system report'
  949. AD(12)='Ads for an account report'
  950. AD(13)='Rate chart maintenance'
  951.  
  952. dimension CASH(7)
  953. CASH(1)='<BMenu/T'
  954. CASH(2)='Add a transaction'
  955. CASH(3)='Change a transaction'
  956. CASH(4)='Delete a transaction'
  957. CASH(5)='List transactions'
  958. CASH(6)='Post transactions'
  959. CASH(7)='Reprint posting reports'
  960.  
  961. dimension CLOX(1)
  962. CLOX(1)='<BMenu/I'
  963.  
  964. dimension ATG(10)
  965. ATG(1)='<BMenu/G'
  966. ATG(2)='Aging reports'
  967. ATG(3)='Age accounts receivable'
  968. ATG(4)='Service charge assessment'
  969. ATG(5)='Statements and invoices'
  970. ATG(6)='Reminder notices'
  971. ATG(7)='Ledgers - print:purge'
  972. ATG(8)='Gl distribution - print purge'
  973. ATG(9)='Sales analysis reports'
  974. ATG(10)='Sales analysis reports - consolidated'
  975.  
  976. dimension CF(6)
  977. CF(1)='<BMenu/F'
  978. CF(2)='Gl numbers'
  979. CF(3)='Transaction codes'
  980. CF(4)='Salesperson codes'
  981. CF(5)='Section codes'
  982. CF(6)='Account type codes'
  983.  
  984. dimension SY(1)
  985. SY(1)='<BMenu/S'
  986.  
  987. dimension UT(11)
  988. UT(1)='<BMenu/U'
  989. UT(2)='Balance forward'
  990. UT(3)='Reindex'
  991. UT(4)='Balance check'
  992. UT(5)='Change salesperson codes'
  993. UT(6)='Diagnostic report'
  994. UT(7)='Change system date'
  995. UT(8)='Run dos commands'
  996. UT(9)='Function keys assignment'
  997. UT(10)='Change account codes'
  998. UT(11)='User check'
  999.  
  1000. dimension HLP(9)                         && no longer available on menu
  1001. HLP(1)='A. Accounts'
  1002. HLP(2)='B. Contracts'
  1003. HLP(3)='C. Ads:scheduling'
  1004. HLP(4)='D. Cash:transactions'
  1005. HLP(5)='E. Close issue:periods'
  1006. HLP(6)='F. Accounting'
  1007. HLP(7)='G. File maintenance'
  1008. HLP(8)='H. System parameters'
  1009. HLP(9)='I. Utilities'
  1010.  
  1011. dimension QT(1)
  1012. QT(1)='<BQuit to main menu/Q'
  1013. AXZROW=1
  1014. AXZCOL=1
  1015. do while .t.
  1016.    set color to &CCLMENU
  1017.    clear
  1018.    
  1019.    *** You can stick an informative message on the screen.
  1020.    *** The following message was designed using the Mac screen painter.
  1021.    @ PIXELS 12,208 say "Master Menu" style 65536 FONT "Chicago",12 color 0,0,0,-1,-1,-1
  1022.    @ PIXELS 34,62 say "Select Options with Mouse from Above Pull Down Menu" style 65536 FONT "Chicago",12 color 0,0,0,-1,-1,-1
  1023.    @ PIXELS 61,12 say "Acct - Command A - Account Maintenance and Reports" style 65536 FONT "Monaco",12 color 0,0,0,-1,-1,-1
  1024.    @ PIXELS 77,12 say "Cont - Command C - Contract Maintenance" style 65536 FONT "Monaco",12 color 0,0,0,-1,-1,-1
  1025.    @ PIXELS 93,12 say "Ads  - Command D - Ad Maintenance, Scheduling, Runsheet & Ratechart" style 65536 FONT "Monaco",12 color 0,0,0,-1,-1,-1
  1026.    @ PIXELS 109,12 say "Cash - Command T - Cash Receipts and Other Transactions" style 65536 FONT "Monaco",12 color 0,0,0,-1,-1,-1
  1027.    @ PIXELS 125,12 say "Actg - Command G - Accounting Reports and Procedures " style 65536 FONT "Monaco",12 color 0,0,0,-1,-1,-1
  1028.    @ PIXELS 141,12 say "     - Command I - Close Issue " style 65536 FONT "Monaco",12 color 0,0,0,-1,-1,-1
  1029.    @ PIXELS 157,12 say "Code - Command F - Code File Maintenance" style 65536 FONT "Monaco",12 color 0,0,0,-1,-1,-1
  1030.    @ PIXELS 173,12 say "Util - Command U - Utilities" style 65536 FONT "Monaco",12 color 0,0,0,-1,-1,-1
  1031.    @ PIXELS 189,12 say "Sys  - Command S - System Parameters" style 65536 FONT "Monaco",12 color 0,0,0,-1,-1,-1
  1032.    @ PIXELS 205,12 say "Quit - Command Q - Quit to Main Menu" style 65536 FONT "Monaco",12 color 0,0,0,-1,-1,-1
  1033.    @ PIXELS 237,12 say "Choose Add an Account or Change an Account" style 65536 FONT "Monaco",12 color 0,0,0,-1,-1,-1
  1034.    @ PIXELS 253,12 say "to see what happens when you make a choice" style 65536 FONT "Monaco",12 color 0,0,0,-1,-1,-1
  1035.    
  1036.    close databases
  1037.    menu bar AZXTOP,10            && decreased by one to reflect missing option
  1038.    menu 1,ACCT,13,13             && increased by one to reflect added line
  1039.    menu 2,CTRC,9,9
  1040.    menu 3,AD,13,13
  1041.    menu 4,CASH,7,7
  1042.    menu 5,CLOX,1,1
  1043.    menu 6,ATG,10,10
  1044.    menu 7,CF,6,6
  1045.    menu 8,SY,1,1
  1046.    menu 9,UT,11,11
  1047.    *MENU 11,HLP,9,9              && deleted option
  1048.    menu 10,QT,1,1
  1049.    
  1050.    read menu bar to AXZCOL, AXZROW save
  1051.    
  1052.    menu off 1                    && turn menus off: this code will not activate
  1053.    menu off 2                    && other menu items during a read or wait
  1054.    menu off 3                    && except for items on the Apple menu like
  1055.    menu off 4                    && DA's.
  1056.    menu off 5                    && but turning off the menus will discourage
  1057.    menu off 6                    && users from trying -- they can still see
  1058.    menu off 7                    && menu options, they're just grayed out
  1059.    menu off 8
  1060.    menu off 9
  1061.    menu off 10
  1062.    
  1063.    *** rest of the code remains unchanged
  1064.    do case
  1065.    case AXZCOL=10  .and. AXZROW=1
  1066.       close data
  1067.       return
  1068.    case AXZCOL=1  .and. AXZROW=2
  1069.       do BOXPROG
  1070.    case AXZCOL=1  .and. AXZROW=3
  1071.       do help
  1072.    endcase
  1073. enddo
  1074.  
  1075. ******************************************************************************
  1076. *** PRINPROG.PRG
  1077. *** Menu for various printing examples
  1078. ******************************************************************************
  1079. procedure PRINPROG
  1080.  
  1081. private CHOICE
  1082. CHOICE=1
  1083. do while .t.
  1084.    set color to &CCLBOX
  1085.    clear
  1086.    @ 4,16 to 6,61 double
  1087.    @ 4,16 to 12,61 double
  1088.    set color to &CCLTITLE
  1089.    @ 5, 31 say "PRINTING EXAMPLES"
  1090.    set color to &CCLTEXT
  1091.    @ 8, 19 prompt "A. COLUMNS IN MONO VS PROPORTIONAL FONTS"
  1092.    @ 9, 19 prompt "B. REAL TIME PRINTING                   "
  1093.    @ 10, 19 prompt "Q. QUIT                                 "
  1094.    menu to CHOICE
  1095.    do case
  1096.    case CHOICE=1
  1097.       do PRINPRO1
  1098.    case CHOICE=2
  1099.       do PRINPRO2
  1100.    case CHOICE=3
  1101.       return
  1102.    endcase
  1103. enddo
  1104.  
  1105. ******************************************************************************
  1106. *** PRINPRO1.PRG
  1107. *** Shows effects of proportional fonts on columns
  1108. ******************************************************************************
  1109. procedure PRINPRO1
  1110. private TTITLE
  1111. clear
  1112. set color to &CCLBOX
  1113. @ 5, 7 say "COLUMNS IN MONOSPACED VS PROPORTIONAL FONTS"
  1114. @ 6, 7 say "==========================================="
  1115. set color to &CCLTEXT
  1116. @ 8, 7 say "The following examples show the effect of using a proportional font"
  1117. @ 9, 7 say "on reports that are generated with different programming techniques."
  1118. @ 10, 7 say "On the PC or on a Mac with a mono-spaced font, these reports will be"
  1119. @ 11, 7 say "identical (more or less). Since here we're using standard Mac"
  1120. @ 12, 7 say "printing (WSYISWYG), the 9 pt Monaco font will not fill up the"
  1121. @ 13, 7 say "width of the page."
  1122. @ 23,0
  1123. wait
  1124.  
  1125. store 'ON THE MAC THIS REPORT IS BEING PRINTED IN 9 PT MONACO - MONO SPACED FONT' to TTITLE
  1126. if MMAC
  1127.    set printer to                         && returns to standard Mac printing
  1128.                                           && screen/printing font already set
  1129.                                           && to 9 pt mono-spaced Monaco
  1130. endif
  1131. do report
  1132.  
  1133. store 'ON THE MAC THIS REPORT IS BEING PRINTED IN 12 PT CHICAGO - PROPORTIONAL FONT' to TTITLE
  1134. if MMAC
  1135.    screen FONT "Chicago", 12 lock        && whenever you issue a screen command
  1136.                                          && include LOCK so window cannot be
  1137.                                          && closed
  1138. endif
  1139. do report
  1140.  
  1141. if MMAC
  1142.    screen FONT "Monaco", 9  lock            && return to 9 pt Monaco screen font
  1143.    restore from 'PRINTER.MEM' additive      && set back to com port
  1144.    set printer to &PRNPORT,PRNBAUD,&PRNPARITY,&PRNDATA,&PRNSTOP,&PRNHAND,&PRNEND
  1145. endif
  1146.  
  1147. return
  1148.  
  1149. ******************************************************************************
  1150. *** REPORT.PRG
  1151. *** Used by PRINPRO1.PRG
  1152. ******************************************************************************
  1153. procedure report
  1154. private VVAR
  1155. dimension VVAR(40,1)
  1156. VVAR(1)='Something'
  1157. VVAR(2)='Another  '
  1158. VVAR(3)='Whatever '
  1159. VVAR(4)='Who      '
  1160. VVAR(5)='What     '
  1161. VVAR(6)='Which    '
  1162. VVAR(7)='Dogs     '
  1163. VVAR(8)='Cats     '
  1164. VVAR(9) ='Mice     '
  1165. VVAR(10)='Roses    '
  1166. VVAR(11)='Begonias '
  1167. VVAR(12)='Peonies  '
  1168. VVAR(13)='Bats     '
  1169. VVAR(14)='Hats     '
  1170. VVAR(15)='Bats/Hats'
  1171. VVAR(16)='Testing  '
  1172. VVAR(17)='Is Boring'
  1173. VVAR(18)='This, Too'
  1174. VVAR(19)=VVAR(1)
  1175. VVAR(20)=VVAR(2)
  1176. VVAR(21)=VVAR(3)
  1177. VVAR(22)=VVAR(4)
  1178. VVAR(23)=VVAR(5)
  1179. VVAR(24)=VVAR(6)
  1180. VVAR(25)=VVAR(7)
  1181. VVAR(26)=VVAR(8)
  1182. VVAR(27)=VVAR(9)
  1183. VVAR(28)=VVAR(10)
  1184. VVAR(29)=VVAR(11)
  1185. VVAR(30)=VVAR(12)
  1186. VVAR(31)=VVAR(13)
  1187. VVAR(32)=VVAR(14)
  1188. VVAR(33)=VVAR(15)
  1189. VVAR(34)=VVAR(16)
  1190. VVAR(35)=VVAR(17)
  1191. VVAR(36)=VVAR(18)
  1192. VVAR(37)='Something'
  1193. VVAR(38)='Another  '
  1194. VVAR(39)='Whatever '
  1195. VVAR(40)='Who      '
  1196.  
  1197. set device to print
  1198. @ 1,0 say TTITLE
  1199. @ 3,0 say 'This report uses precise horizontal placement of each data item with @ row,col.'
  1200. @ 4,0 say 'This particular coding method will produce columns that will align properly'
  1201. @ 5,0 say 'in proportional fonts, but letter spacing may not be what you desire.'
  1202.  
  1203. @ 7,0 say ' COLUMN1 '
  1204. @ 7,11 say ' COLUMN2 '
  1205. @ 7,22 say ' COLUMN3 '
  1206. @ 8,0 say '========='
  1207. @ 8,11 say '========='
  1208. @ 8,22 say '========='
  1209. store 9 to CNTR
  1210. store 1 to CNTR3
  1211. do while CNTR<=20
  1212.    @ CNTR,0 say VVAR(CNTR3)
  1213.    @ CNTR,11 say VVAR(CNTR3+1)
  1214.    @ CNTR,22 say VVAR(CNTR3+2)
  1215.    store CNTR+1 to CNTR
  1216.    store CNTR3+3 to CNTR3
  1217. enddo
  1218. eject
  1219.  
  1220. @ 1,0 say TTITLE
  1221. @ 3,0 say 'This report uses spaces to position horizontal elements. This coding'
  1222. @ 4,0 say 'method will not produce columns that align in proportional fonts.'
  1223.  
  1224. @ 6,0 say ' COLUMN1    COLUMN2    COLUMN3'
  1225. @ 7,0 say '=========  =========  ========='
  1226. store 8 to CNTR
  1227. store 1 to CNTR3
  1228. do while CNTR<=20
  1229.    @ CNTR,0 say VVAR(CNTR3)+'  '+VVAR(CNTR3+1)+'  '+VVAR(CNTR3+2)
  1230.    store CNTR+1 to CNTR
  1231.    store CNTR3+3 to CNTR3
  1232. enddo
  1233. eject
  1234.  
  1235. set device to screen
  1236. return
  1237.  
  1238. ******************************************************************************
  1239. *** PRINPRO2.PRG
  1240. *** Shows problems with character/line spacing, real time printing
  1241. ******************************************************************************
  1242. procedure PRINPRO2
  1243. clear
  1244. set color to &CCLBOX
  1245. @ 5, 4 say "REAL TIME PRINTING"
  1246. @ 6, 4 say "=================="
  1247. set color to &CCLTEXT
  1248. @ 8,4 say "The following examples show the effects of different programming techniques"
  1249. @ 9,4 say "on the way something is printed on the Mac. In these examples, we are trying"
  1250. @ 10,4 say "to print one label at a time (this would be used to allow a user to align"
  1251. @ 11,4 say "the label stock). On the PC, these will all print the same: one label after"
  1252. @ 12,4 say "another."
  1253. set color to &CCLWARN
  1254. @ 13,4 say "THESE EXAMPLES WERE DESIGNED FOR USE WITH AN IMPACT PRINTER"
  1255. @ 14,4 say "AND THIS PROCEDURE MAY TAKE A LOT OF PAPER"
  1256. @ 15,4 say "DO YOU WANT TO CONTINUE? (Y/N)"
  1257. set color to &CCLGET
  1258. OK='N'
  1259. @ 15,36 get OK picture '!' valid OK$'YN'
  1260. read
  1261. if OK='N'
  1262.    return
  1263. endif
  1264. clear
  1265. set color to &CCLTEXT
  1266. @ 9,4 say 'The following examples use common PC techniques to print labels.'
  1267. @ 10,4 say 'On the Mac, this batch will be printed using standard Mac printing.'
  1268. @ 12,4 say "First we'll start with labels printed using the ? command"
  1269. @ 13,4 say "Then we'll print labels with the @..SAY command"
  1270. @ 23,0
  1271. wait
  1272.  
  1273. if MMAC
  1274.    set printer to             && change to standard mac printing
  1275. endif
  1276. do LABELS1
  1277.  
  1278. clear
  1279. set color to &CCLTEXT
  1280. @ 9,4 say 'The following examples show revised code for use with the Mac and PC.'
  1281. @ 10, 4 say 'On the Mac, they will be printed with printer set to COM port'
  1282. @ 11,4 say 'at 10 chars/inch and 6/lines inch. Besides spacing differences,'
  1283. @ 12,4 say 'notice how much faster it prints.'
  1284. @ 14,4 say "See program comments for for more information."
  1285. @ 23,0
  1286. wait
  1287.  
  1288. if MMAC
  1289.    restore from 'PRINTER.MEM' additive      && set back to com port
  1290.    set printer to &PRNPORT,PRNBAUD,&PRNPARITY,&PRNDATA,&PRNSTOP,&PRNHAND,&PRNEND
  1291.    *** SET SPACING TO 10 CHARACTERS/INCH 6 LINES/INCH
  1292.    set print on
  1293.    ?? chr(27)+PRNCH10           && escape sequence for 10 chars/inch
  1294.    ?? chr(27)+PRN6LINE          && escape sequence for 6 lines/inch
  1295.    set print off
  1296. endif
  1297.  
  1298. do LABELS2
  1299.  
  1300. return
  1301.  
  1302. ******************************************************************************
  1303. *** LABELS1.PRG
  1304. *** Used by PRINPRO2
  1305. ******************************************************************************
  1306. procedure LABELS1
  1307. *** General comments:
  1308. *** Characters and line spacing in standard Mac printing are hard to control.
  1309. ***    Both are functions of the font. Consequently, 6 lines in 9 pt Monaco
  1310. ***    is not 1 inch nor are 10 characters 1 inch. It's hard to find just the
  1311. ***    right font to print exactly where you want it to go. The first two sets
  1312. ***    of labels, show these spacing problems.
  1313.  
  1314. *** Standard Mac printing and standard PC code:
  1315. ***    When using a SET PRINT ON, A SET PRINT OFF ejects the page. So, in
  1316. ***    the very first set of labels printed on the Mac, you will see one label
  1317. ***    print, a page eject and then the remaining labels print. 
  1318. ***
  1319. ***    Nothing comes out until you tell it to.
  1320. ***    In both the examples here, when we're in the printing loop, labels will
  1321. ***    print when the final SET PRINT OFF or EJECT command is issued. On the
  1322. ***    PC, they would print one at a time.
  1323.  
  1324. ***    The following code shows standard PC code for this kind of job running
  1325. ***    in Mac with Mac standard printing.
  1326. set print on
  1327. ?? 'This was printed using ?'
  1328. ? 'line2'
  1329. ? 'line3'
  1330. ? 'line4'
  1331. ? 'line5'
  1332. ? 'line6'
  1333. set print off              && in standard printing this will eject the page
  1334. clear
  1335. store 'Y' to OK
  1336. set color to &CCLBOX
  1337. @ 6,4 say "USING THE ? COMMAND"
  1338. @ 7,4 say "==================="
  1339. @ 8,4 say 'HERE WE WANT TO PAUSE TO ALLOW THE USER TO ALIGN THE LABEL STOCK.'
  1340. @ 9,4 say 'WE WANT PRINTING TO RESUME WHERE IT LEFT OFF'
  1341. @ 19,4 say "Mac Notes:"
  1342. @ 20,4 say "Notice that although a label has printed, it has ejected the page."
  1343. @ 21,4 say "When you continue, nothing will print for awhile since we don't "
  1344. @ 22,4 say "SET PRINT OFF until the very end."
  1345. set color to &CCLTEXT
  1346. @ 11,4 say 'DO YOU WANT TO PRINT MORE LABELS? (Y/N) '
  1347. set color to &CCLGET
  1348. @ row(),col() get OK picture '!' valid OK$'YN'
  1349. read
  1350. if OK='Y'
  1351.    set print on
  1352.    CNTR=1
  1353.    do while CNTR<=15
  1354.       ? 'This was printed using ?'
  1355.       ? 'line2'
  1356.       ? 'line3'
  1357.       ? 'line4'
  1358.       ? 'line5'
  1359.       ? 'line6'
  1360.       CNTR=CNTR+1
  1361.    enddo
  1362.    set print off    && ejects the page in standard mac printing
  1363. endif
  1364.  
  1365. *** The following code shows standard PC code running in Mac standard printing.
  1366.  
  1367. set device to print
  1368. store 0 to CNTR2
  1369. @ CNTR2,0 say  'This was printed using @ SAY'
  1370. @ CNTR2+1, 0 say  'line2'
  1371. @ CNTR2+2, 0 say 'line3'
  1372. @ CNTR2+3, 0 say 'line4'
  1373. @ CNTR2+4, 0 say 'line5'
  1374. @ CNTR2+5, 0 say 'line6'
  1375. CNTR2=CNTR2+6
  1376. set device to screen
  1377. clear
  1378. store 'Y' to OK
  1379. set color to &CCLBOX
  1380. @ 6,4 say "USING THE @..SAY COMMAND"
  1381. @ 7,4 say "========================"
  1382. @ 8,4 say 'HERE WE WANT TO PAUSE TO ALLOW THE USER TO ALIGN THE LABEL STOCK.'
  1383. @ 9,4 say 'WE WANT PRINTING TO RESUME WHERE IT LEFT OFF'
  1384. @ 19,4 say "Mac notes:"
  1385. @ 20,4 say "Notice that nothing has printed yet. That's because this is PC code"
  1386. @ 21,4 say "and we have not issued a SET PRINTER TO or EJECT command. Notice that"
  1387. @ 22,4 say "nothing will print for awhile because we don't issue that command"
  1388. @ 23,4 say 'until the very end.'
  1389. set color to &CCLTEXT
  1390. @ 11,4 say 'DO YOU WANT TO PRINT MORE LABELS? (Y/N) '
  1391. set color to &CCLGET
  1392. @ row(),col() get OK picture '!' valid OK$'YN'
  1393. read
  1394. if OK='Y'
  1395.    set device to print
  1396.    store 1 to CNTR
  1397.    do while CNTR<=15
  1398.       @ CNTR2,0 say  'This was printed using @ SAY'
  1399.       @ CNTR2+1, 0 say  'line2'
  1400.       @ CNTR2+2, 0 say 'line3'
  1401.       @ CNTR2+3, 0 say 'line4'
  1402.       @ CNTR2+4, 0 say 'line5'
  1403.       @ CNTR2+5, 0 say 'line6'
  1404.       CNTR=CNTR+1
  1405.       CNTR2=CNTR2+6
  1406.    enddo
  1407.    eject                      && set printer to also works but don't use 
  1408.                               && if you're printing to COM
  1409.    set device to screen
  1410. endif
  1411.  
  1412. ******************************************************************************
  1413. *** LABELS2.PRG
  1414. *** Used by PRINPRO2
  1415. ******************************************************************************
  1416. procedure LABELS2
  1417.  
  1418. *** For "real time" printing -- printing one thing at a time, especially to
  1419. *** allow a pause for forms alignment -- it's necessary to use a combination
  1420. *** of ? and SET PRINT ON/OFF commands. This is especially true when using
  1421. *** the @...SAY COMMAND which also requires the SET DEVICE TO PRINT/SCREEN
  1422. *** command.
  1423.  
  1424.  
  1425. set print on
  1426. ?? 'This was printed using ?'
  1427. ? 'line2'
  1428. ? 'line3'
  1429. ? 'line4'
  1430. ? 'line5'
  1431. ? 'line6'
  1432. set print off
  1433. clear
  1434. store 'Y' to OK
  1435. set color to &CCLBOX
  1436. @ 6,4 say "USING THE ? COMMAND"
  1437. @ 7,4 say "========================"
  1438. @ 8,4 say 'HERE WE WANT TO PAUSE TO ALLOW THE USER TO ALIGN THE LABEL STOCK.'
  1439. @ 9,4 say 'WE WANT PRINTING TO RESUME WHERE IT LEFT OFF'
  1440. @ 19,4 say "Mac notes:"
  1441. @ 20,4 say "Notice that a label has printed. The next label will be printed"
  1442. @ 21,4 say "on the next line. Each label will be printed in real time."
  1443. set color to &CCLTEXT
  1444. @ 11,4 say 'DO YOU WANT TO PRINT MORE LABELS? (Y/N) '
  1445. set color to &CCLGET
  1446. @ row(),col() get OK picture '!' valid OK$'YN'
  1447. read
  1448. if OK='Y'
  1449.    CNTR=1
  1450.    do while CNTR<=15
  1451.       set print on
  1452.       if MMAC
  1453.          pcol=0
  1454.          ?? 'This was printed using?'       && The reason for this code on the
  1455.                                             && Mac is a little difficult to
  1456.                                             && explain. OK, I don't *know*
  1457.                                             && why it works, it just does and
  1458.                                             && at this point I don't care
  1459.                                             && anymore. So sue me.
  1460.          
  1461.       else
  1462.          ? 'This was printed using ?'
  1463.       endif
  1464.       ? 'line2'
  1465.       ? 'line3'
  1466.       ? 'line4'
  1467.       ? 'line5'
  1468.       ? 'line6'
  1469.       CNTR=CNTR+1
  1470.       set print off
  1471.    enddo
  1472. endif
  1473.  
  1474. set device to print
  1475. set print on
  1476. store 0 to CNTR2
  1477. @ CNTR2,0 say  'This was printed using @ SAY'
  1478. @ CNTR2+1, 0 say  'line2'
  1479. @ CNTR2+2, 0 say 'line3'
  1480. @ CNTR2+3, 0 say 'line4'
  1481. @ CNTR2+4, 0 say 'line5'
  1482. @ CNTR2+5, 0 say 'line6'
  1483. ?
  1484. if MMAC
  1485.    CNTR2=0                          && with incrementing counters on the Mac
  1486.                                     && reset counter to 0 each time
  1487. else
  1488.    CNTR2=CNTR2+6
  1489. endif
  1490. set device to screen                && the SET DEVICE TO SCREEN and
  1491. set print off                       && SET PRINT OFF commands
  1492.                                     && must be exactly in this order to work
  1493. clear
  1494. store 'Y' to OK
  1495. set color to &CCLBOX
  1496. @ 6,4 say "USING THE @..SAY COMMAND"
  1497. @ 7,4 say "========================"
  1498. @ 8,4 say 'HERE WE WANT TO PAUSE TO ALLOW THE USER TO ALIGN THE LABEL STOCK.'
  1499. @ 9,4 say 'WE WANT PRINTING TO RESUME WHERE IT LEFT OFF'
  1500. @ 19,4 say "Mac notes:"
  1501. @ 20,4 say "Notice that a label has printed. The next label will be printed"
  1502. @ 21,4 say "on the next line. Each label will be printed in real time."
  1503. set color to &CCLTEXT
  1504. @ 11,4 say 'DO YOU WANT TO PRINT MORE LABELS? (Y/N) '
  1505. set color to &CCLGET
  1506. @ row(),col() get OK picture '!' valid OK$'YN'
  1507. read
  1508. if .not. MMAC
  1509.   set console off                      && saves screen scrolling on the PC
  1510. endif
  1511. if OK='Y'
  1512.    store 1 to CNTR
  1513.    do while CNTR<=15
  1514.       set device to print                  && both these commands are necessary
  1515.       set print on                         && for Mac to allow use of ?
  1516.       @ CNTR2,0 say  'This was printed using @ SAY'
  1517.       @ CNTR2+1, 0 say  'line2'
  1518.       @ CNTR2+2, 0 say 'line3'
  1519.       @ CNTR2+3, 0 say 'line4'
  1520.       @ CNTR2+4, 0 say 'line5'
  1521.       @ CNTR2+5, 0 say 'line6'
  1522.       ?
  1523.       CNTR=CNTR+1
  1524.       if MMAC
  1525.          CNTR2=0                           && because prow() = 0
  1526.       else
  1527.          CNTR2=CNTR2+6
  1528.       endif                              && for real time printing:
  1529.       set device to screen               && <-both these commands are necessary
  1530.       set print off                      && <-and exactly in this order
  1531.                                          && even if you aren't returning to the
  1532.                                          && screen at this moment
  1533.    enddo
  1534. endif
  1535. set device to print
  1536. eject
  1537. set device to screen
  1538. set console on
  1539.  
  1540.  
  1541.  
  1542.  
  1543. ******************************************************************************
  1544. *** HELP.PRG
  1545. *** Your existing help routine -- not using a Mac help file
  1546. ******************************************************************************
  1547. procedure help
  1548.  
  1549. clear
  1550. set color to &CCLBOX
  1551. @ 2,17 to 10,58 double
  1552. set color to &CCLTITLE
  1553. @ 4, 30 say "NO HELP AT ALL    "
  1554. set color to &CCLTEXT
  1555. @ 7, 25 say "Your help routine goes here."
  1556.  
  1557. *** sample get
  1558. @ 16,0 say "Here's a sample GET. If you want to see how the color commands"
  1559. @ 17,0 say "work with this, try setting color to W/N,N/W"
  1560. * set color to W/N,N/W
  1561. set color to &CCLGET
  1562. OK='HIYA'
  1563. @ 19,0 get OK picture '!!!!'
  1564. read
  1565. @ 23,0
  1566. wait
  1567. return
  1568.  
  1569.  
  1570. ******************************************************************************
  1571. *** ABOUT.PRG
  1572. *** Shows an "about your program" message
  1573. ******************************************************************************
  1574. procedure ABOUT
  1575.  
  1576. clear
  1577. screen 5 type 1  at 0,0 size 197,385 pixels  font "Geneva",12 color 0,0,0,-1,-1,-1 top
  1578. @ pixels 45,94 say "DISPLAY/390" style 65536 font "New York",24 color 0,0,0,-1,-1,-1
  1579. @ pixels 81,37 say "Ad Scheduling and Accounts Receivable Software" style 65536 font "Chicago",12 color 0,0,0,-1,-1,-1
  1580. @ pixels 117,87 say "(c) 1989, 1990 Nancy Jacobsen" style 65536 font "Geneva",12 color 0,0,0,-1,-1,-1
  1581. @ pixels 133,84 say "Pacific Sun Computer Systems" style 65536 font "Geneva",12 color 0,0,0,-1,-1,-1
  1582. wait
  1583. screen 5 off
  1584. screen 5 delete
  1585. screen 1 top lock
  1586. retry
  1587.